<template>
    <fieldset>
        <legend>这是父组件</legend>
        <h1>这是一个父组件</h1>
        <Child :g="gift" @re="get"/>
        <child2 />
    </fieldset>
</template>

<script>
    import Child from "./Child.vue"
    import Child2 from "./Child2.vue"
    export default{
        methods:{
            get(input){
                console.log(input);
            }
        },
        data(){
            return{
                gift:'守望先锋'
            }
        },
        components: {
            Child,
            Child2
        },
        beforeCreate(){
            console.log('父组件的beforeCreate');
        },
        created(){
            console.log('父组件的created');
        },
        beforeMount(){
            console.log('父组件的beforeMount');
        },
        mounted(){
            console.log('父组件的mounted');
        },
        beforeDestroy(){
            console.log('父组件的beforeDestroy');
        },
        destroyed(){
            console.log('父组件的destroyed');
        }
    }
</script>